cognizant automata questions with answer